<template>
  <li class="shop_li border-1px" @click="Details(ItemData.id)">
    <div class="shop_left">
      <img class="shop_img" :src="'//elm.cangdu.org/img/'+ItemData.image_path" width="70px">
    </div>
    <div class="shop_right">
      <section class="shop_detail_header">
        <h4>{{ItemData.name}}</h4>
        <div class="shop_detail" v-for="i in ItemData.supports" :key="i.id">
          <span class="textRight">{{i.icon_name}}</span>
        </div>
      </section>
      <section class="shop_rating_order">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-xingxing2"></use>
        </svg>
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-xingxing2"></use>
        </svg>
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-xingxing2"></use>
        </svg>
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-xingxing2"></use>
        </svg>
        <svg class="icon" aria-hidden="true" v-if="ItemData.rating>4.5">
          <use xlink:href="#icon-xingxing2"></use>
        </svg>
        <svg class="icon" aria-hidden="true" v-else>
          <use xlink:href="#icon-xingxing3"></use>
        </svg>
        <span class="rating">{{ItemData.rating}}</span>
        <span class="recent_order_num">月售{{ItemData.recent_order_num}}单</span>
        <div class="rating_order_num_right">
          <span class="delivery_style delivery_left">蜂鸟专送</span>
          <span class="delivery_style delivery_right">准时达</span>
          <!-- <span class="delivery_style delivery_left">{{item.delivery_mode.text}}</span>
                  <span class="delivery_style delivery_right">{{item.supports[1].name}}</span> -->
        </div>
      </section>
      <h5 class="fee_distance">
        <span class="peisong">￥{{ItemData.float_minimum_order_amount}}起送 </span>
        <span class="peisong"> / {{ItemData.piecewise_agent_fee.tips}}</span>
        <div class="distance_time">
          <span class="rightTime1">{{ItemData.distance}} /</span>
          <span class="rightTime2"> {{ItemData.order_lead_time}}</span>
        </div>
      </h5>
    </div>
  </li>
</template>

<script>
export default {
  props: {
    //商家总数据
    ItemData: {
      type: Object,
      default: {}
    }
  },
  methods: {
    //餐馆详情
    Details(id) {
      window.sessionStorage.setItem('shopid', id)
      this.$router.push('/Details')
    }
  }
}
</script>

<style>
</style>